package com.eyas.software.pattern.eventbus.test.subtest;

import com.eyas.software.pattern.eventbus.annotation.Subscriber;

/**
 * 第二个订阅者
 */
public class Observer2 {

    @Subscriber(eventType = int.class)
    public void method1() {
        System.out.println("Observer2.method1收到通知......");
    }

    @Subscriber
    public void method2(String eventContent) {
        System.out.println("Observer2.method2收到通知,通知内容:["+eventContent+"]");
    }

    /**
     * 第三个订阅者
     */
    public static class Observer3 {
        @Subscriber(eventType = int.class)
        public void method1(int eventContent) {
            System.out.println("Observer3.method1收到通知,通知内容:["+eventContent+"]");
        }
    }
}
